home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr50
/
wbb13.zip
/
SAMPLEM1.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-06-04
|
2KB
|
86 lines
rem
rem This program is a simple example of using menu's.
rem
rem In this case we display the current time and the user can select
rem the color of the background using a menu. The current color
rem will be 'grayed' so it cannot be selected.
rem
rem This program is only for Windows use.
rem
y=mouseon
rem
rem define my menu bar at top of screen
rem
mainmenu "&Color","","","","",""
rem
rem define menu items
rem
rem the '&' symbol tells windows what keyboard shortcut will select this
addsubmenu 1,"&Black",1059
addsubmenu 1,"&Red",1060
addsubmenu 1,"",0
addsubmenu 1,"&Blue",1061
bcolor=1
color 7,bcolor
cls
menuitemgray 1061
100
t$=time$
if t$<>oldt$ then
oldt$=t$
locate 12,35,0
print t$;
end if
a$=inkey$
if a$="" then goto 100
if len(a$)=1 then goto 100
if right$(a$,1)=chr$(59) then
rem
rem change to black
rem
menuitemon 1060
menuitemon 1061
menuitemgray 1059
bcolor=0
color 7,bcolor
cls
oldt$=""
elseif right$(a$,1)=chr$(60) then
rem
rem change to red
rem
menuitemon 1059
menuitemon 1061
menuitemgray 1060
bcolor=4
color 7,bcolor
cls
oldt$=""
elseif right$(a$,1)=chr$(61) then
rem
rem change to white
rem
menuitemon 1059
menuitemon 1060
menuitemgray 1061
bcolor=1
color 7,bcolor
cls
oldt$=""
end if
goto 100